﻿package mortal.game.view.mainUI.smallMap.view
{
    import com.mui.controls.*;
    import com.mui.display.*;
    import com.mui.utils.*;
    import mortal.common.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.mainUI.smallMap.view.render.*;

    public class SmallMapRightTop extends GSprite
    {
        private var _titleBg:ScaleBitmap;
        private var _title0:GBitmap;
        private var _title1:GBitmap;
        private var _items:Array;

        public function SmallMapRightTop()
        {
            return;
        }// end function

        public function updateItems(param1:Array) : void
        {
            var _loc_3:SmallMapShowItem = null;
            var _loc_2:int = 0;
            while (_loc_2 < param1.length && _loc_2 < this._items.length)
            {
                
                _loc_3 = this._items[_loc_2] as SmallMapShowItem;
                _loc_3.updateData(param1[_loc_2]);
                _loc_2++;
            }
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            var _loc_2:SmallMapShowItem = null;
            super.createDisposedChildrenImpl();
            this._titleBg = UIFactory.bg(2, 2, 200, 22, this, ImagesConst.RegionTitleBg);
            this._title0 = UIFactory.gBitmap(ImagesConst.MapPic_DTZXS, 10, 5, this);
            this._title1 = UIFactory.gBitmap(ImagesConst.MapPic_XS, 162, 5, this);
            this._items = [];
            var _loc_1:int = 0;
            while (_loc_1 < 6)
            {
                
                _loc_2 = UICompomentPool.getUICompoment(SmallMapShowItem) as SmallMapShowItem;
                _loc_2.x = 6;
                _loc_2.y = 24 * _loc_1 + 29;
                this._items.push(_loc_2);
                this.addChild(_loc_2);
                _loc_1++;
            }
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._titleBg.dispose(param1);
            this._titleBg = null;
            this._title0.dispose(param1);
            this._title0 = null;
            this._title1.dispose(param1);
            this._title1 = null;
            DisplayUtil.delNotUse(this._items, 0, param1);
            this._items = null;
            return;
        }// end function

    }
}
